package types

type ChecklistCodeReq struct {
	Code         string         `msg:"编码" form:"code"`             // code可选 编码
	Phone        string         `msg:"手机号" form:"phone"`          // phone可选 手机号
	CustomerName string         `msg:"客户姓名" form:"customerName"` // customerName可选 客户姓名
	CustomerId   uint64         `msg:"客户id" form:"customerId"`     // customerId可选 客户id
	RelationId   uint64         `msg:"亲属id" form:"relationId"`     // relationId可选 亲属id
	StartDate    string         `msg:"开始日期" form:"startDate"`    // startDate可选 开始日期
	EndDate      string         `msg:"结束日期" form:"endDate"`      // endDate可选 结束日期
	TimeType     int64          `msg:"时间类型" form:"timeType"`     //timeType可选 时间类型
	OrganQueries []OrganListReq `msg:"组织机构列表" form:"organQueries"`
	OrganId      uint64         `msg:"组织机构id" form:"organId"`
	Page         int32          `msg:"页码" form:"page" `           // page 页码
	Size         int32          `msg:"页容量" form:"size" `         // size 页容量
	Ids          []uint64       `msg:"多个id" form:"ids"`           // ids可选 多个id
	CheckListId  uint64         `msg:"检查单id" form:"checkListId"` // checkListId可选 检查单id
}

type ReportCheckListResp struct {
	Resp
	ChecklistListResp `json:"data" msg:"检查单信息列表"`
}

type ChecklistListResp struct {
	List  []Checklist `json:"list"  msg:"检查单信息列表"`
	Total int64       `json:"total"  msg:"总数"`
}

type Checklist struct {
	CustomerId       uint64                `json:"customerId"   msg:"客户id"`           //客户id
	CustomerName     string                `json:"customerName"   msg:"客户姓名"`       //客户姓名
	CustomerPhone    string                `json:"customerPhone"   msg:"客户电话号码"`  //客户电话
	RelationId       uint64                `json:"relationId"  msg:"亲属id"`            //亲属id
	RelationName     string                `json:"relationName"  msg:"亲属姓名"`        //亲属姓名
	BaseRelationId   uint64                `json:"baseRelationId"  msg:"亲属关系id"`    //亲属关系id
	BaseRelationName string                `json:"baseRelationName" msg:"亲属关系名称"` //亲属关系名称
	Age              int32                 `json:"age"  msg:"年龄"`
	Sex              int32                 `json:"sex"  msg:"性别"`
	List             []ChecklistDataForApi `json:"list"  msg:"检查单信息列表"`
}

type ChecklistDataForApi struct {
	ID                uint64           `json:"id" msg:"id"`                        //主键ID
	CreatedAt         string           `json:"createdAt" msg:"创建时间"`           // 创建时间，这是给前端看的，所以应该由时间戳转成对应的日期字符串
	UpdatedAt         string           `json:"updatedAt" msg:"更新时间"`           // 更新时间，这是给前端看的，所以应该由时间戳转成对应的日期字符串
	Code              string           `json:"code"  msg:"检查单编号"`             //检查单编号
	CustomerId        uint64           `json:"customerId"   msg:"客户id"`          //客户id
	CustomerName      string           `json:"customerName"   msg:"客户姓名"`      //客户姓名
	CustomerPhone     string           `json:"customerPhone"   msg:"客户电话号码"` //客户电话
	Age               int32            `json:"age"  msg:"年龄"`                    //年龄
	Sex               int32            `json:"sex"  msg:"性别"`                    //性别
	Birthday          int64            `json:"birthday"  msg:"生日"`
	RelationId        uint64           `json:"relationId"  msg:"亲属id"`     //亲属id
	RelationName      string           `json:"relationName"  msg:"亲属姓名"` //亲属姓名
	Phone             string           `json:"phone"  msg:"亲属电话"`
	BaseRelationId    uint64           `json:"baseRelationId"  msg:"亲属关系id"`     //亲属关系id
	BaseRelationName  string           `json:"baseRelationName"  msg:"亲属关系名称"` //亲属关系名称
	OrganId           uint64           `json:"organId"  msg:"组织机构id"`            //组织机构id
	ReportPdf         string           `json:"reportPdf"  msg:"报告地址"`            //报告地址
	Status            int32            `json:"status"  msg:"检查单状态"`             //检查单状态
	ResultInfo        string           `json:"resultInfo"  msg:"检查结果"`
	Advice            string           `json:"advice"  msg:"建议"`
	ProjectId         []uint64         `json:"projectId"   msg:"项目id"` //项目id
	ProjectList       []ProjectNameReq `json:"projectList"  msg:"项目信息列表"`
	CompanyName       string           `json:"companyName"  msg:"组织机构名称"`
	Origin            string           `json:"origin"  msg:"来源"`
	Occupation        string           `json:"occupation"  msg:"职业"`
	WorkEnvironment   string           `json:"workEnvironment"  msg:"工作环境"`
	EyeDistance       string           `json:"eyeDistance"  msg:"用眼距离"`
	Complaints        string           `json:"complaints"  msg:"主诉"`
	MedicalCardNumber string           `json:"medicalCardNumber"  msg:"医疗卡号"`
}

type ProjectNameReq struct {
	ID          uint64             `json:"id" msg:"id"`
	ProjectName string             `json:"projectName"  msg:"项目名称"`
	DeviceList  []DeviceOutCodeReq `json:"deviceList"  msg:"设备列表"`
	Count       int64              `json:"count"  msg:"条数"`
	IsCustomize int32              `json:"isCustomize"  msg:"是否自定义"`
	RegionId    uint64             `json:"regionId"  msg:"区域id"`
}

type DeviceOutCodeReq struct {
	DeviceId    uint64 `json:"deviceId"  msg:"设备id"`
	DeviceSn    string `json:"deviceSn"  msg:"设备sn"`
	OutCode     string `json:"outCode"  msg:"设备外码"`
	ProductsId  uint64 `json:"productsId"  msg:"产品id"`
	IsAuthentic int32  `json:"isAuthentic"  msg:"是否是真实设备"`
}

type ChecklistDataForApiResp struct {
	Resp
	Data ChecklistDataForApi `json:"data" msg:"检查单信息"`
}

type QueryRegionReq struct {
	ChecklistId uint64   `msg:"检查单id" json:"checklistId" `
	ProjectIds  []uint64 `msg:"项目id" json:"projectIds" `
}

type RegionInfo struct {
	RegionId     uint64 `msg:"区域id" json:"regionId"`
	RegionName   string `msg:"区域名称" json:"regionName"`
	ProjectId    uint64 `msg:"项目id" json:"projectId"`
	RegionResult string `msg:"区域结果" json:"regionResult"`
}
type QueryRegionData struct {
	RegionInfos []RegionInfo `msg:"区域信息" json:"regionInfos"`
	Aiid        string       `msg:"aiid" json:"aiid"`
	AiResult    string       `msg:"AI结果" json:"aiResult"`
	EditResult  string       `msg:"编辑结果" json:"editResult"`
}

type QueryRegionDataResp struct {
	Resp
	Data QueryRegionData `json:"data" msg:"区域信息"`
}

type SendMessageToDevicesReq struct {
	OrganId       uint64   `msg:"组织机构id" json:"organId"` // 组织机构id
	ProjectIdList []uint64 `msg:"项目id列表" json:"projectIdList"`
	Scan          string   `msg:"扫码信息" json:"scan"`
}

type DeviceDataPayload struct {
	Code     int    `json:"code"  msg:"状态码"`          //状态码,0成功其他失败
	Msg      string `json:"msg"  msg:"失败时为错误原因"` //失败时为错误原因
	DeviceSn string `json:"deviceSn"  msg:"设备sn"`      //设备sn
}

type DeviceDataPayloadList struct {
	List  []DeviceDataPayload `json:"list"`
	Total int64               `json:"total"`
}

type SendMessageToDevicesResp struct {
	Resp
	Data DeviceDataPayloadList `json:"data" msg:"发送结果"`
}

type ResultListReq struct {
	Name      string `msg:"姓名" form:"name"`          // name可选 姓名
	Phone     string `msg:"手机号" form:"phone"`       // phone可选 手机号
	DeviceSn  string `msg:"设备sn" form:"deviceSn"`    // deviceSn可选 设备sn
	ProjectId uint64 `msg:"项目id" form:"projectId"`   // projectId可选 项目id
	OrganId   uint64 `msg:"组织机构id" form:"organId"` // organId可选 组织机构id
	StartDate string `msg:"开始日期" form:"startDate"` // startDate可选 开始日期
	EndDate   string `msg:"结束日期" form:"endDate"`   // endDate可选 结束日期
	Page      int32  `msg:"页码" form:"page" `         // page 页码
	Size      int32  `msg:"页容量" form:"size" `       // size 页容量
}

type IdsReq struct {
	Ids []uint64 `json:"ids"`
}

type GlassesInfoReq struct {
	Id            uint64 `json:"id" msg:"id"`
	ChecklistId   uint64 `json:"checklistId"  msg:"检查单id"`      // checklistId 检查单id
	GlassesResult string `json:"glassesResult" msg:"配镜相关结果"` // glassesResult 配镜相关结果
	GlassesAdvice string `json:"glassesAdvice" msg:"配镜建议"`     // glassesAdvice 配镜建议
	TrialPlan     string `json:"trialPlan" msg:"试训方案"`
	Other         string `json:"other" msg:"其他"`
}

type GlassesInfoReqResp struct {
	Resp
	Data GlassesInfoReq `json:"data" msg:"配镜信息"`
}

type IdReq struct {
	Id      uint64 `json:"id"`
	OrganId uint64 `json:"organId"` // organId可选 组织机构id
}

type TemplateListReq struct {
	TemplateName string `msg:"模板名称" form:"templateName"` // templateName可选 模板名称
	StartDate    string `msg:"开始日期" form:"startDate"`    // startDate可选 开始日期
	EndDate      string `msg:"结束日期" form:"endDate"`      // endDate可选 结束日期
	Page         int32  `msg:"页码" form:"page" `            // page 页码
	Size         int32  `msg:"页容量" form:"size" `          // size 页容量
}

type TemplateListForApi struct {
	List         interface{}             `json:"list"  msg:"数据列表信息"`
	Total        int64                   `json:"total"  msg:"数据总数"`
	ProductsList []ProductTemplateForApi `json:"productsList" msg:"产品关联模板列表"`
}

type ProductTemplateForApi struct {
	ID           uint64 `json:"id" msg:"id"`
	CategoryId   uint64 `json:"categoryId"  msg:"分类id"`
	CategoryName string `json:"categoryName"  msg:"分类名称"`
	TypeId       uint64 `json:"typeId"  msg:"型号id"`
	TypeName     string `json:"typeName"  msg:"型号名称"`
	TemplateId   uint64 `json:"templateId"  msg:"模板id"`
}

type TemplateListForApiResp struct {
	Resp
	Data TemplateListForApi `json:"data" msg:"模板列表"`
}

type ReportInfoForApiOne struct {
	ID               uint64 `json:"id" msg:"id"` // 主键ID
	CustomRelativeId uint64 `json:"customRelativeId" msg:"客户亲属id"`
	ProjectName      string `json:"projectName"  msg:"项目名称"`
	TemplateId       uint64 `json:"templateId"  msg:"模板id"`
	Sort             int32  `json:"sort"  msg:"排序"`
	ResultData       string `json:"resultData"  msg:"报告数据"` // 报告数据
	OrganId          uint64 `json:"organId"  msg:"组织机构id"`  // 组织机构id
	Name             string `json:"name"   msg:"姓名"`          // 姓名
	Phone            string `json:"phone"  msg:"电话号码"`      // 电话
	Age              int32  `json:"age"  msg:"年龄"`            // 年龄
	Sex              int32  `json:"sex"  msg:"性别"`            // 性别
	ListId           uint64 `json:"listId" msg:"检查单id"`
	ResultInfo       string `msg:"检查结果" json:"resultInfo"`
	TemplateApi      string `json:"templateApi"  msg:"模板api"`
}

type ReportPdfForApi struct {
	ReportPdf string `json:"reportPdf"  msg:"报告地址"`
}
type ReportPdfForApiResp struct {
	Resp
	Data ReportPdfForApi `json:"data" msg:"报告地址"`
}

type ChecklistInfoForApi struct {
	ID                uint64           `json:"id,optional" validate:"omitempty" msg:"id"`              //主键ID
	CreatedAt         string           `json:"createdAt,optional" validate:"omitempty" msg:"创建时间"` // 创建时间，这是给前端看的，所以应该由时间戳转成对应的日期字符串
	UpdatedAt         string           `json:"updatedAt,optional" validate:"omitempty" msg:"更新时间"` // 更新时间，这是给前端看的，所以应该由时间戳转成对应的日期字符串
	Code              string           `json:"code,optional" validate:"omitempty"  msg:"检查单编号"`   //检查单编号
	CustomerId        uint64           `json:"customerId" validate:"required"  msg:"客户id"`           //客户id
	CustomerName      string           `json:"customerName" validate:"required"  msg:"客户姓名"`       //客户姓名
	CustomerPhone     string           `json:"customerPhone" validate:"required"  msg:"客户电话号码"`  //客户电话
	Age               int32            `json:"age,optional" validate:"omitempty"  msg:"年龄"`          //年龄
	Sex               int32            `json:"sex,optional" validate:"omitempty"  msg:"性别"`          //性别
	Birthday          int64            `json:"birthday,optional" validate:"omitempty"  msg:"生日"`
	RelationId        uint64           `json:"relationId,optional" validate:"omitempty"  msg:"亲属id"`     //亲属id
	RelationName      string           `json:"relationName,optional" validate:"omitempty"  msg:"亲属姓名"` //亲属姓名
	Phone             string           `json:"phone,optional" validate:"omitempty"  msg:"亲属电话"`
	BaseRelationId    uint64           `json:"baseRelationId,optional" validate:"omitempty"  msg:"亲属关系id"`     //亲属关系id
	BaseRelationName  string           `json:"baseRelationName,optional" validate:"omitempty"  msg:"亲属关系名称"` //亲属关系名称
	OrganId           uint64           `json:"organId,optional" validate:"omitempty"  msg:"组织机构id"`            //组织机构id
	ReportPdf         string           `json:"reportPdf,optional" validate:"omitempty"  msg:"报告地址"`            //报告地址
	Status            int32            `json:"status,optional" validate:"omitempty"  msg:"检查单状态"`             //检查单状态
	ResultInfo        string           `json:"resultInfo,optional" validate:"omitempty"  msg:"检查结果"`
	Advice            string           `json:"advice,optional" validate:"omitempty"  msg:"建议"`
	ProjectId         []uint64         `json:"projectId" validate:"required"  msg:"项目id"` //项目id
	ProjectList       []ProjectNameReq `json:"projectList,optional" validate:"omitempty"  msg:"项目信息列表"`
	CompanyName       string           `json:"companyName,optional" validate:"omitempty"  msg:"组织机构名称"`
	Origin            string           `json:"origin,optional" validate:"omitempty"  msg:"来源"`
	Occupation        string           `json:"occupation,optional" validate:"omitempty"  msg:"职业"`
	WorkEnvironment   string           `json:"workEnvironment,optional" validate:"omitempty"  msg:"工作环境"`
	EyeDistance       string           `json:"eyeDistance,optional" validate:"omitempty"  msg:"用眼距离"`
	Complaints        string           `json:"complaints,optional" validate:"omitempty"  msg:"主诉"`
	MedicalCardNumber string           `json:"medicalCardNumber,optional" validate:"omitempty"  msg:"医疗卡号"`
}

type ChecklistInfoForApiList struct {
	List  []ChecklistInfoForApi `json:"list"  msg:"检查单列表"`
	Total int64                 `json:"total"  msg:"检查单总数"`
}

type ChecklistInfoForApiResp struct {
	Data ChecklistInfoForApiList `json:"data"`
	Resp
}

type ListReq struct {
	Page        int32  `form:"page"`                 // page 页码
	Size        int32  `form:"size"`                 // size 页容量
	Query       string `form:"query,optional"`       // query可选 参数
	OrganId     uint64 `form:"organId,optional"`     // organId可选 组织机构id
	IsCustomize int32  `form:"isCustomize,optional"` // isCustomize可选 是否自定义
	IsDefmod    int32  `form:"isDefmod,optional"`    // isDefmod可选 是否默认模版
	ProjectName string `form:"projectName,optional"` // projectName可选 项目名称
	Status      int32  `form:"status,optional"`
}

type ListDeviceResp struct {
	List  []ProjectDataForApi `json:"list" form:"list" validate:"required"  msg:"数据列表"` // list 数据列表
	Total int64               `json:"total" form:"total" validate:"required"  msg:"总数"`   // total 总数
}

type ProjectDataForApi struct {
	ID          uint64      `json:"id,optional" validate:"omitempty" msg:"id"`              // 主键ID
	CreatedAt   string      `json:"createdAt,optional" validate:"omitempty" msg:"创建时间"` // 创建时间，这是给前端看的，所以应该由时间戳转成对应的日期字符串
	UpdatedAt   string      `json:"updatedAt,optional" validate:"omitempty" msg:"更新时间"` // 更新时间，这是给前端看的，所以应该由时间戳转成对应的日期字符串
	ProjectName string      `json:"projectName" validate:"required"  msg:"项目名称"`        //项目名称
	Remark      string      `json:"remark,optional" validate:"omitempty"  msg:"备注"`       //备注
	IsCustomize int32       `json:"isCustomize,optional" validate:"omitempty"  msg:"是否自定义"`
	DeviceList  []DeviceReq `json:"deviceList,optional" validate:"omitempty"  msg:"设备列表"`
	DataIds     []uint64    `json:"dataIds,optional" validate:"omitempty"  msg:"数据列表"`
	IsDefmod    int32       `json:"isDefmod" validate:"required"  msg:"是否默认项目"`
	Status      int32       `json:"status,optional" validate:"omitempty"  msg:"状态"`
	TemplateId  uint64      `json:"templateId,optional" validate:"omitempty"  msg:"模板id"`
	TypeList    []TypeData  `json:"typeList,optional" validate:"omitempty"  msg:"类型列表"`
	Sort        int32       `json:"sort,optional" validate:"omitempty"  msg:"排序"`
}
type DeviceReq struct {
	ID          uint64 `json:"id,optional" validate:"omitempty" msg:"id"`
	ProjectId   uint64 `json:"projectId" validate:"required" msg:"项目id"`
	DeviceId    uint64 `json:"deviceId" validate:"omitempty"  msg:"设备id"`
	DeviceSn    string `json:"deviceSn" validate:"omitempty"  msg:"设备sn"`
	OutCode     string `json:"outCode" validate:"omitempty"  msg:"设备外码"`
	ProductsId  uint64 `json:"productsId" validate:"omitempty"  msg:"产品id"`
	IsAuthentic int32  `json:"isAuthentic" validate:"omitempty"  msg:"是否是真实设备"`
}

type TypeData struct {
	Id           uint64 `json:"id,optional" validate:"omitempty" msg:"id"`
	CategoryId   int32  `json:"categoryId" validate:"required" msg:"类别id"`
	CategoryName string `json:"categoryName" validate:"required" msg:"类别名称"`
	BrandId      int32  `json:"brandId" validate:"required" msg:"品牌id"`
	BrandName    string `json:"brandName" validate:"required" msg:"品牌名称"`
	TypeId       int32  `json:"typeId" validate:"required" msg:"类型id"`
	TypeName     string `json:"typeName" validate:"required" msg:"类型名称"`
}
type ListDeviceRespResp struct {
	Resp
	Data ListDeviceResp `json:"data" form:"data" validate:"required"  msg:"数据列表"` // data 数据列表
}

type CreateChecklist struct {
	Id         uint64   `json:"id" validate:"required" msg:"检查单id"`
	Code       string   `json:"code" validate:"required" msg:"编码"`
	ProjectIds []uint64 `json:"projectIds" validate:"required" msg:"检查项目id列表"`
}

type CreateChecklistResp struct {
	Resp
	Data CreateChecklist `json:"data" form:"data" validate:"required"  msg:"创建检查单"` // data 创建检查单
}

type CustomerChecklistRequest struct {
	ID            uint64           `json:"id,optional" validate:"omitempty" msg:"id"`
	CreatedAt     string           `json:"createdAt,optional" validate:"omitempty" msg:"创建时间"` // 创建时间，这是给前端看的，所以应该由时间戳转成对应的日期字符串
	UpdatedAt     string           `json:"updatedAt,optional" validate:"omitempty" msg:"更新时间"` // 更新时间，这是给前端看的，所以应该由时间戳转成对应的日期字符串
	Code          string           `json:"code,optional" validate:"omitempty"  msg:"检查单编号"`
	HeadUrl       string           `json:"headUrl,optional" validate:"omitempty" msg:"头像地址"`
	CustomerId    uint64           `json:"customerId" validate:"required" msg:"客户id"`
	CustomerName  string           `json:"customerName" validate:"required" msg:"客户姓名"`
	CustomerPhone string           `json:"customerPhone" validate:"required" msg:"客户电话号码"`
	RelationId    uint32           `json:"relationId,optional" validate:"omitempty" msg:"亲属id"`
	RelationName  string           `json:"relationName,optional" validate:"omitempty" msg:"亲属姓名"`
	Sex           int32            `json:"sex,optional" validate:"omitempty" msg:"性别"`
	PaidAmount    int64            `json:"paidAmount" validate:"omitempty" msg:"实付金额"`
	Phone         string           `json:"phone" validate:"omitempty" msg:"亲属联系电话"`
	ProjectList   []ProjectNameReq `json:"projectList,optional" validate:"omitempty"  msg:"项目信息列表"`
}

type CustomerChecklistRequestList struct {
	List  []CustomerChecklistRequest `json:"list"  msg:"检查单列表"`
	Total int64                      `json:"total"  msg:"检查单总数"`
}

type CustomerChecklistRequestResp struct {
	Resp
	Data CustomerChecklistRequestList `json:"data" form:"data" validate:"required"  msg:"检查单列表"` // data 检查单列表
}

type ResultDataForApi struct {
	ID               uint64 `json:"id,optional" validate:"omitempty" msg:"id"` //主键ID
	CustomId         uint64 `json:"customId" validate:"required" msg:"客户id"`
	CustomRelativeId uint64 `json:"customRelativeId" validate:"omitempty" msg:"亲属id"`
	Name             string `json:"name" validate:"required" msg:"姓名"`                 //姓名
	Phone            string `json:"phone" validate:"required" msg:"电话号码"`            //电话
	Sex              int32  `json:"sex" validate:"required" msg:"性别"`                  //性别
	Age              int32  `json:"age" validate:"required" msg:"年龄"`                  //年龄
	DataListInfo     string `json:"dataListInfo" validate:"required" msg:"数据列表信息"` //数据列表
	VisitorId        string `json:"visitorId" validate:"required" msg:"访客id"`          //访客id
	SessionId        string `json:"sessionId" validate:"required" msg:"会话id"`          //会话id
	ResultData       string `json:"resultData" validate:"required" msg:"数据信息"`       //数据
	ResultDataCn     string `json:"resultDataCn" validate:"required" msg:"中文数据信息"` //中文数据
	ProjectId        uint64 `json:"projectId" validate:"required" msg:"项目id"`          //项目id
	ProjectName      string `json:"projectName" validate:"required" msg:"项目名称"`
	TemplateId       uint64 `json:"templateId" validate:"required" msg:"模板id"`
	Sort             int32  `json:"sort" validate:"omitempty" msg:"排序"`
	TypeName         string `json:"typeName" validate:"required" msg:"设备型号名称"` //设备型号名称
	ListId           uint64 `json:"listId" validate:"required" msg:"检查单id"`       //检查单id
	ProductId        uint64 `json:"productId" validate:"required" msg:"产品id"`
	ReportPdf        string `json:"reportPdf" validate:"required" msg:"报告地址"`           //报告地址
	DeviceSn         string `json:"deviceSn" validate:"required" msg:"设备sn"`              //设备sn
	OrganizationId   uint64 `json:"organId,optional" validate:"omitempty" msg:"组织机构id"` //组织机构id
	MongoId          string `json:"mongoId" validate:"required" msg:"mongoId"`
	ReqType          int32  `json:"reqType" validate:"required" msg:"请求类型"`
	ListCode         string `json:"listCode" validate:"required" msg:"检查单编号"`
	CreatedAt        string `json:"createdAt,optional" validate:"omitempty"`
	UpdatedAt        string `json:"updatedAt,optional" validate:"omitempty"`
}

type ResultDataForApiList struct {
	List  []ResultDataForApi `json:"list"  msg:"数据列表"`
	Total int64              `json:"total"  msg:"数据总数"`
}

type ResultDataForApiResp struct {
	Resp
	Data ResultDataForApiList `json:"data" form:"data" validate:"required"  msg:"数据列表"` // data 数据列表
}

type UpdateResultReq struct {
	Id       uint64 `json:"id" validate:"required"  msg:"id"`
	DeviceSn string `json:"deviceSn" validate:"required" msg:"设备sn"`
	ListId   uint64 `json:"listId" validate:"required"  msg:"检查单id"`
}

type UpdateRegionResultReq struct {
	ListId           uint64       `json:"listId" validate:"required" msg:"检查单id"`
	ListCode         string       `json:"listCode" validate:"required" msg:"检查单编号"`
	CustomId         int64        `json:"customId" validate:"required" msg:"客户id"`
	CustomRelativeId int64        `json:"customRelativeId" validate:"omitempty" msg:"亲属id"`
	BaseRelationId   int64        `json:"baseRelationId" validate:"omitempty" msg:"亲属关系id"`
	OrganizetionId   uint64       `json:"organizetionId" validate:"omitempty" msg:"组织机构id"`
	Name             string       `json:"name" validate:"required" msg:"姓名"`
	Phone            string       `json:"phone" validate:"required" msg:"电话号码"`
	Age              int32        `json:"age" validate:"omitempty" msg:"年龄"`
	Sex              int32        `json:"sex" validate:"omitempty" msg:"性别"`
	DataPayload      []RegionInfo `json:"dataPayload" validate:"required" msg:"数据信息"`
	Scan             string       `json:"scan" validate:"omitempty" msg:"扫描结果"`
}

type AiContentReq struct {
	ChecklistId  uint64 `json:"checklistId" validate:"required" msg:"检查单id"`   // 检查单id
	Content      string `json:"content,optional" validate:"omitempty" msg:"内容"` // 内容
	OrganId      uint64 `json:"organId,optional" validate:"omitempty" msg:"组织机构id"`
	QuestionType string `json:"questionType,optional" validate:"omitempty" msg:"问题类型"`
}

type AiResponsePayload struct {
	ID           string        `json:"id" validate:"required" msg:"请求的唯一标识符"`                           // 请求的唯一标识符
	QuestionType string        `json:"questionType" validate:"required" msg:"问题类型"`                         // 问题类型
	Choices      []ChoicesInfo `json:"choices" validate:"required" msg:"生成的回复列表，包含消息内容和完成原因"` // 生成的回复列表，包含消息内容和完成原因
	Usage        UsageInfo     `json:"usage" validate:"required" msg:"Token 使用情况统计"`                      // Token 使用情况统计
	IsUse        int32         `json:"isUse" validate:"required" msg:"是否使用"`                                // 是否使用
}

type UsageInfo struct {
	PromptTokens     int `json:"prompt_tokens" validate:"required" msg:"提示Token数量"`
	CompletionTokens int `json:"completion_tokens" validate:"required" msg:"完成Token数量"`
	TotalTokens      int `json:"total_tokens" validate:"required" msg:"总Token数量"`
}
type MessageInfo struct {
	Role    string `json:"role" validate:"required" msg:"发送者角色"`
	Content string `json:"content" validate:"required" msg:"内容"`
}
type ChoicesInfo struct {
	Message      MessageInfo `json:"message"`
	FinishReason string      `json:"finish_reason"`
}

type AiResponsePayloadList struct {
	List []AiResponsePayload `json:"list" validate:"required" msg:"ai请求返回结果列表"` //ai请求返回结果列表
}

type AiResponsePayloadListResp struct {
	Resp
	Data AiResponsePayloadList `json:"data" form:"data" validate:"required"  msg:"ai请求返回结果列表"` // data ai请求返回结果列表
}

type UseAiGenerateContentReq struct {
	UniqueId string `json:"UniqueId" validate:"required" msg:"UniqueId"` // 唯一标识符
	IsUse    int32  `json:"isUse" validate:"required" msg:"是否使用"`    // 是否使用
}

type ChecklistDiagnosisListReq struct {
	ChecklistId uint64                  `json:"checklistId" validate:"required" msg:"检查单id"`
	DataType    string                  `json:"dataType,optional" validate:"omitempty" msg:"数据类型"`
	List        []ChecklistDiagnosisReq `json:"list" validate:"required" msg:"检查单诊断列表"`
}

type ChecklistDiagnosisReq struct {
	Id       int64          `json:"id" validate:"required" msg:"id"`
	Name     string         `json:"name" validate:"required" msg:"名称"`
	DataList []LabelDataReq `json:"dataList" validate:"required" msg:"诊断信息列表"`
}
type LabelDataReq struct {
	Id        int64  `json:"id" validate:"required" msg:"id"`
	AiId      string `json:"aiId,optional" validate:"omitempty" msg:"aiId"`
	DictLabel string `json:"dictLabel" validate:"required" msg:"数据"`
}

type ReportResultDataReq struct {
	Page        int32  `form:"page"`                 // page 页码
	Size        int32  `form:"size"`                 // size 页容量
	Query       string `form:"query,optional"`       // query可选 参数
	OrganId     uint64 `form:"organId,optional"`     // organId可选 组织机构id
	IsCustomize int32  `form:"isCustomize,optional"` // isCustomize可选 是否自定义
	IsDefmod    int32  `form:"isDefmod,optional"`    // isDefmod可选 是否默认模版
	ProjectName string `form:"projectName,optional"` // projectName可选 项目名称
	Status      int32  `form:"status,optional"`
}

type ResultDataItem struct {
	ResultData   string `json:"resultData" validate:"required" msg:"数据信息"`       // 数据信息
	ResultDataCn string `json:"resultDataCn" validate:"required" msg:"中文数据信息"` // 中文数据信息
}

type ReportResultList struct {
	List []ResultDataItem `json:"list"  msg:"数据列表"`
}

type ReportResultResp struct {
	Resp
	Data ReportResultList `json:"data" form:"data" validate:"required"  msg:"数据列表"` // data 数据列表
}

type TrendReq struct {
	Name       string   `json:"name" validate:"required"  msg:"姓名"`
	Phone      string   `json:"phone" validate:"required"  msg:"手机号"`
	OrganId    uint64   `json:"organId,optional" validate:"omitempty"  msg:"组织机构id"`
	TimeType   int64    `json:"timeType" validate:"required"  msg:"时间类型"`
	ResultData []string `json:"resultData" validate:"required"  msg:"检查结果数据"`
}

type ResultInfoReq struct {
	ResultData     string   `json:"resultData" validate:"required" msg:"数据信息"`
	ResultDataList []string `json:"resultDataList" validate:"required" msg:"数据列表信息"`
}

type ResultTrendInfoList struct {
	List      []ResultInfoReq `json:"list" validate:"required" msg:"数据列表信息"`
	Timestamp []int64         `json:"timestamp" validate:"required" msg:"时间戳列表"`
}

type ResultTrendInfoResp struct {
	Resp
	Data ResultTrendInfoList `json:"data" form:"data" validate:"required"  msg:"数据列表"` // data 数据列表
}

type CodeReq struct {
	Code         string `msg:"编码" form:"code,optional" validate:"omitempty"`                                          // code可选 编码
	Phone        string `msg:"手机号" json:"phone,optional" form:"phone,optional" validate:"omitempty"`                 // phone可选 手机号
	CustomerName string `msg:"客户姓名" json:"customerName,optional" form:"customerName,optional" validate:"omitempty"` // customerName可选 客户姓名
	CustomerId   uint64 `msg:"客户id" json:"customerId,optional" form:"customerId,optional" validate:"omitempty"`       // customerId可选 客户id
	RelationId   uint64 `msg:"亲属id" json:"relationId,optional" form:"relationId,optional" validate:"omitempty"`       // relationId可选 亲属id
	OrganId      uint64 `msg:"组织机构id" json:"organId,optional" form:"organId,optional" validate:"omitempty"`
	TemplateId   uint64 `msg:"模版id" json:"templateId,optional" form:"templateId,optional" validate:"omitempty"`
	StartDate    string `msg:"开始日期" json:"startDate,optional" form:"startDate,optional" validate:"omitempty"` // startDate可选 开始日期
	EndDate      string `msg:"结束日期" json:"endDate,optional" form:"endDate,optional" validate:"omitempty"`     // endDate可选 结束日期
	TimeType     int64  `msg:"时间类型" json:"timeType,optional" form:"timeType,optional" validate:"omitempty"`   //timeType可选 时间类型
	Page         int32  `msg:"页码" json:"page" form:"page" validate:"required"`                                  // page 页码
	Size         int32  `msg:"页容量" json:"size" form:"size" validate:"required"`                                // size 页容量
}
type PreferenceListReq struct {
	Page    int32  `msg:"页码" json:"page" form:"page" validate:"required"`                            // page 页码
	Size    int32  `msg:"页容量" json:"size" form:"size" validate:"required"`                          // size 页容量
	OrganId uint64 `msg:"组织id" json:"organId,optional" form:"organId,optional" validate:"omitempty"` // organId 组织id
}
type PreferenceListResp struct {
	Resp
	Data PreferenceInfoList `json:"data" form:"data" validate:"required"  msg:"数据列表"` // data 数据列表
}
type PreferenceInfoList struct {
	List  []PreferenceInfo `json:"list" validate:"required" msg:"数据列表信息"`
	Total int64            `json:"total" validate:"required" msg:"总数"`
}
type PreferenceInfo struct {
	Id       uint64 `json:"id" validate:"required" msg:"id"`
	Word     string `json:"word" validate:"required" msg:"词"`
	OrganId  uint64 `json:"organId" validate:"required" msg:"组织id"`
	TypeName string `json:"typeName" validate:"required" msg:"类型名称"`
}

type DeleteChecklistReq struct {
	Id uint64 `json:"id" validate:"required" msg:"id"`
}
